using UnityEngine;
using UnityEngine.UI;

namespace hole.speedrungame
{
	public class UIProgressionSpeedRun : MonoBehaviour
	{
		public Text currentScoreText;

		public Text bestScoreText;

		public Image progressionImage;

		public void SetColor(Color color)
		{
			progressionImage.color = color;
		}

		public void SetProgression(int current, int max)
		{
			float num = (float)current / (float)max;
			currentScoreText.text = $"{num * 100f:0.00}%";
			progressionImage.fillAmount = num;
		}

		public void SetBest(float best)
		{
			bestScoreText.text = string.Format("{0} {1:0.00}%", LocalizationManager.GetTranslation("TXT_GAME_BEST"), best);
		}
	}
}
